import axios from 'axios'
import ggjk from '@/api/ggjk/ggjk'
axios.defaults.baseURL=ggjk.baseURL


axios.interceptors.request.use(
    function(config:any){ 
        let token = localStorage.getItem('token')
        config.headers.authorization='Bearer ' + token
        return config
    },
    function(err){
        return Promise.reject(err)
    }
)
axios.interceptors.response.use(
    function(res){
        return res.data
    },
    function(err){
        return Promise.reject(err)
    }
)
export default axios